# as --32 -o cpuid2.o cpuid2.s
# ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -lc -o cpuid2 cpuid2.o

.section .data
output:
	.asciz "info: %s\n"
.section .bss
	.lcomm buffer, 12

.section .text
	.global _start

_start:
	movl $0, %eax
	cpuid
	movl $buffer, %esi
	movl %ebx, (%esi)
	movl %edx, 4(%esi)
	movl %ecx, 8(%esi)
	
	pushl $buffer
	pushl $output
	call printf
	add $8, %esp
	
	movl $1, %eax
	movl $0, %ebx
	int $0x80
	
	